﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
///db_copyright 的摘要说明
/// </summary>
public class db_copyright
{
    SqlDBClass db;
	public db_copyright()
	{
        db = new SqlDBClass();   
	}

    public DataSet selectOne() {
        string strsql = "select * from copyright where id=1";
        return db.execSql(strsql);
    }

    public Boolean updateCr(string cryear, string owner, string approve) {
        string strsql = "";
        if (selectOne().Tables[0].Rows.Count == 0)
        {
            strsql = "insert into copyright values ('" + cryear + "','" + owner + "','" + approve + "')";
        }
        else
        {
            strsql = "update copyright set cryear='" + cryear + "',owner='" + owner + "',approve='" + approve + "' where id=1";
        }
        return db.execSqlNoQuery(strsql);
    }
}